<?php

/**
 * SrcmtBrigadistasDado form base class.
 *
 * @method SrcmtBrigadistasDado getObject() Returns the current form's model object
 *
 * @package    srcmt
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseSrcmtBrigadistasDadoForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'codigo_brigadista'          => new sfWidgetFormInputHidden(),
      'nacionalidad'               => new sfWidgetFormInputText(),
      'cedula_identidad'           => new sfWidgetFormInputText(),
      'religion'                   => new sfWidgetFormInputText(),
      'primer_apellido'            => new sfWidgetFormInputText(),
      'segundo_apellido'           => new sfWidgetFormInputText(),
      'primer_nombre'              => new sfWidgetFormInputText(),
      'segundo_nombre'             => new sfWidgetFormInputText(),
      'sexo'                       => new sfWidgetFormInputCheckbox(),
      'fecha_nacimiento'           => new sfWidgetFormDate(),
      'lugar_de_nacimiento'        => new sfWidgetFormInputText(),
      'estado_civil'               => new sfWidgetFormInputText(),
      'foto'                       => new sfWidgetFormInputText(),
      'grupo_sanguineo'            => new sfWidgetFormInputText(),
      'codigo_estado'              => new sfWidgetFormInputText(),
      'codigo_municipio'           => new sfWidgetFormInputText(),
      'codigo_parroquia'           => new sfWidgetFormInputText(),
      'codigo_ciudad'              => new sfWidgetFormInputText(),
      'direccion_domiciliaria'     => new sfWidgetFormTextarea(),
      'telefono_domicilio'         => new sfWidgetFormInputText(),
      'telefono_movil'             => new sfWidgetFormInputText(),
      'correo_electronico'         => new sfWidgetFormInputText(),
      'direccion_emergencia'       => new sfWidgetFormTextarea(),
      'telefono_emergencia'        => new sfWidgetFormInputText(),
      'unidad_adscripcion_laboral' => new sfWidgetFormInputText(),
      'extension_interna'          => new sfWidgetFormInputText(),
      'perfil_empleado'            => new sfWidgetFormInputText(),
      'jefe_sector'                => new sfWidgetFormInputText(),
      'grado_instruccion'          => new sfWidgetFormInputText(),
      'especialidad'               => new sfWidgetFormTextarea(),
      'sedes'                      => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('SrcmtSedes'), 'add_empty' => false)),
      'jerarquia'                  => new sfWidgetFormInputText(),
      'profesion'                  => new sfWidgetFormInputText(),
      'oficio'                     => new sfWidgetFormInputText(),
      'centro_votacion_cne'        => new sfWidgetFormInputText(),
      'direccion_oficina'          => new sfWidgetFormTextarea(),
      'talla_pantalon'             => new sfWidgetFormInputText(),
      'talla_camisa'               => new sfWidgetFormInputText(),
      'talla_calzado'              => new sfWidgetFormInputText(),
      'talla_gorra'                => new sfWidgetFormInputText(),
      'estatura'                   => new sfWidgetFormInputText(),
      'peso'                       => new sfWidgetFormInputText(),
      'color_cabello'              => new sfWidgetFormInputText(),
      'color_piel'                 => new sfWidgetFormInputText(),
      'discapacidad'               => new sfWidgetFormTextarea(),
      'alergias'                   => new sfWidgetFormTextarea(),
      'dominio_mano'               => new sfWidgetFormInputText(),
      'deporte'                    => new sfWidgetFormInputText(),
      'actividades_culturales'     => new sfWidgetFormInputText(),
      'apellidos_beneficiario'     => new sfWidgetFormInputText(),
      'nombres_beneficiario'       => new sfWidgetFormInputText(),
      'cedula_beneficiario'        => new sfWidgetFormInputText(),
      'telefono_beneficiario'      => new sfWidgetFormInputText(),
      'created_at'                 => new sfWidgetFormDateTime(),
      'updated_at'                 => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'codigo_brigadista'          => new sfValidatorChoice(array('choices' => array($this->getObject()->get('codigo_brigadista')), 'empty_value' => $this->getObject()->get('codigo_brigadista'), 'required' => false)),
      'nacionalidad'               => new sfValidatorString(array('max_length' => 1)),
      'cedula_identidad'           => new sfValidatorInteger(),
      'religion'                   => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'primer_apellido'            => new sfValidatorString(array('max_length' => 30)),
      'segundo_apellido'           => new sfValidatorString(array('max_length' => 30, 'required' => false)),
      'primer_nombre'              => new sfValidatorString(array('max_length' => 30)),
      'segundo_nombre'             => new sfValidatorString(array('max_length' => 30, 'required' => false)),
      'sexo'                       => new sfValidatorBoolean(),
      'fecha_nacimiento'           => new sfValidatorDate(),
      'lugar_de_nacimiento'        => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'estado_civil'               => new sfValidatorString(array('max_length' => 11, 'required' => false)),
      'foto'                       => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'grupo_sanguineo'            => new sfValidatorString(array('max_length' => 4)),
      'codigo_estado'              => new sfValidatorInteger(array('required' => false)),
      'codigo_municipio'           => new sfValidatorInteger(array('required' => false)),
      'codigo_parroquia'           => new sfValidatorInteger(array('required' => false)),
      'codigo_ciudad'              => new sfValidatorInteger(array('required' => false)),
      'direccion_domiciliaria'     => new sfValidatorString(),
      'telefono_domicilio'         => new sfValidatorString(array('max_length' => 20)),
      'telefono_movil'             => new sfValidatorString(array('max_length' => 11, 'required' => false)),
      'correo_electronico'         => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'direccion_emergencia'       => new sfValidatorString(),
      'telefono_emergencia'        => new sfValidatorString(array('max_length' => 20)),
      'unidad_adscripcion_laboral' => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'extension_interna'          => new sfValidatorString(array('max_length' => 6, 'required' => false)),
      'perfil_empleado'            => new sfValidatorString(array('max_length' => 14, 'required' => false)),
      'jefe_sector'                => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'grado_instruccion'          => new sfValidatorString(array('max_length' => 14)),
      'especialidad'               => new sfValidatorString(),
      'sedes'                      => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('SrcmtSedes'))),
      'jerarquia'                  => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'profesion'                  => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'oficio'                     => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'centro_votacion_cne'        => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'direccion_oficina'          => new sfValidatorString(array('required' => false)),
      'talla_pantalon'             => new sfValidatorString(array('max_length' => 4, 'required' => false)),
      'talla_camisa'               => new sfValidatorString(array('max_length' => 4, 'required' => false)),
      'talla_calzado'              => new sfValidatorString(array('max_length' => 4, 'required' => false)),
      'talla_gorra'                => new sfValidatorString(array('max_length' => 4, 'required' => false)),
      'estatura'                   => new sfValidatorString(array('max_length' => 3, 'required' => false)),
      'peso'                       => new sfValidatorNumber(),
      'color_cabello'              => new sfValidatorString(array('max_length' => 10)),
      'color_piel'                 => new sfValidatorString(array('max_length' => 20)),
      'discapacidad'               => new sfValidatorString(array('required' => false)),
      'alergias'                   => new sfValidatorString(array('required' => false)),
      'dominio_mano'               => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'deporte'                    => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'actividades_culturales'     => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'apellidos_beneficiario'     => new sfValidatorString(array('max_length' => 60)),
      'nombres_beneficiario'       => new sfValidatorString(array('max_length' => 60)),
      'cedula_beneficiario'        => new sfValidatorString(array('max_length' => 11)),
      'telefono_beneficiario'      => new sfValidatorString(array('max_length' => 11)),
      'created_at'                 => new sfValidatorDateTime(),
      'updated_at'                 => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('srcmt_brigadistas_dado[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'SrcmtBrigadistasDado';
  }

}
